import React from "react";
import { Layout } from "@/components/index.js";
import { 
    HashRouter,
    BrowserRouter
} from "react-router-dom";

import ThemeContext from "./utils/theme.js";

import {Provider} from 'mobx-react'
import store from "@/store/";


class App extends React.Component{
    constructor(props){
        super(props)
        this.state={
            theme:{
                background:'#000000',
                color:'#ffffff'
            }
        }
    }
    render(){
        let {
            theme
        }=this.state
        return (
            <HashRouter>
                <Provider store={store}>
                    <ThemeContext.Provider value={theme}>
                        <Layout />
                    </ThemeContext.Provider>
                </Provider>
            </HashRouter>
        )
    }
}


{/* <ThemeToggle theme={theme} onChange={theme => this.setState({ theme })} /> */}
export default App